using System.Text;
using System.Web.UI.WebControls;

namespace zevenseas.Community.Web.UI.WebControls.WebParts
{
    public class TagLine : WebControl
    {
        private string productName;
        private string productId;
        private string version;

        public string Version
        {
            get { return version; }
            set { version = value; }
        }

        public string ProductId
        {
            get { return productId; }
            set { productId = value; }
        }

        public string ProductName
        {
            get { return productName; }
            set { productName = value; }
        }



        protected override void CreateChildControls()
        {
            if (string.IsNullOrEmpty(Version)) Version = "1.0";

            Panel mainDiv = new Panel();
            mainDiv.Attributes.CssStyle.Add("FONT-SIZE", "8.4pt");
            mainDiv.Attributes.CssStyle.Add("COLOR", "#4c4c4c");

            Literal tagLine = new Literal();
            tagLine.Text = "</br><a href='http://www.zevenseas.com/go.aspx?communityid=" + ProductId + "'>" + ProductName + "</a> by <a href='http://www.zevenseas.com'>zevenseas</a>, v" + Version;
            
            mainDiv.Controls.Add(tagLine);

            Controls.Add(mainDiv);

            base.CreateChildControls();
        }
    }
}